 /**
 * 逻辑、功能相关描述:
 *
 * @author yandawei 编写日期：2008-10-20
 */
package com.ce.pms.common.aop.impl;

import com.ce.pms.common.annotation.AssociatedPrecinctQuery;
import com.ce.pms.common.annotation.NoDACL;
import com.ce.pms.exception.DaclUnsupportedParameterException;

/**
 * @author yandawei
 *
 */
public abstract aspect AbstractAssociatePrecinctQueryAdvice {
	public pointcut associatedPrecinctQuery(AssociatedPrecinctQuery anno) : execution(* *(..)) && @annotation(anno);

	public pointcut noDacl() : execution(* *(..)) && @annotation(NoDACL);

	public pointcut cflowbelowAssociatedPrecinctQuery(AssociatedPrecinctQuery anno) : cflowbelow(associatedPrecinctQuery(anno)) &&!cflow(noDacl());

	protected void validateParameter(String paramName,String paramValue){
		if(paramName == null || paramName.length()<0){
			throw new DaclUnsupportedParameterException("AssociatedPrecinctQuery "+paramName+" attribute not allow null");
		}
	}
}
